<template>
  <div class="createPost">
    <div class="main">
      <h3>发表攻略</h3>
      <p>分享你的个人游记，让更多人看到哦！</p>
      <!-- 攻略发布表单 -->
      <createForm :data="num" />
    </div>
    <!-- 草稿 -->
    <draft @readNum="readNum" />
  </div>
</template>

<script>
import createForm from "@/components/raider/createForm";
import draft from "@/components/raider/draft";
export default {
  components: {
    createForm,
    draft,
  },
  data() {
    return {
      num: "",
    };
  },
  //可以进行seo优化，这只做title变化
  head() {
    return {
      title: "分享你的攻略",
    };
  },
  methods: {
    readNum(val) {
      this.num = val;
    },
  },
};
</script>

<style lang="less" scoped>
.createPost {
  width: 1000px;
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  .main {
    width: 750px;
    h3 {
      font-size: 22px;
      margin-bottom: 10px;
      font-weight: 400;
    }
    p {
      color: #999;
      font-size: 12px;
      margin-bottom: 10px;
    }
  }
}
</style>